home *** CD-ROM | disk | FTP | other *** search
/ C++ für Kids / C++ for kids.iso / Buch / Obuttn1a.h < prev    next >
C/C++ Source or Header  |  1999-01-22  |  1KB  |  41 lines

  1. //---------------------------------------------------------------------------
  2. #ifndef ObuttonH
  3. #define ObuttonH
  4. //---------------------------------------------------------------------------
  5. #include <vcl\SysUtils.hpp>
  6. #include <vcl\Controls.hpp>
  7. #include <vcl\Classes.hpp>
  8. #include <vcl\Forms.hpp>
  9. #include <vcl\ExtCtrls.hpp>
  10. //---------------------------------------------------------------------------
  11. class TOButton : public TCustomControl
  12. {
  13. private:
  14.   bool Pressed;
  15.   TColor Color;
  16.   void __fastcall SetColor(TColor OBrush, TColor OPen);
  17. protected:
  18.   virtual void __fastcall Paint(void);
  19.   virtual void __fastcall MouseDown
  20.     (TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
  21.   virtual void __fastcall MouseUp
  22.     (TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
  23. public:
  24.   void __fastcall SetSize (TRect Rechteck);
  25.   __fastcall TOButton(TComponent* Owner);
  26.   __fastcall TOButton(TComponent* Owner, TColor Farbe);
  27.   __fastcall TOButton(TComponent* Owner, TRect Rechteck);
  28. __published:
  29.   __property OnClick;
  30.   __property OnMouseDown;
  31.   __property OnMouseUp;
  32.   __property OnMouseMove;
  33.   __property OnEnter;
  34.   __property OnExit;
  35.   __property OnKeyPress;
  36.   __property OnKeyDown;
  37.   __property OnKeyUp;
  38. };
  39. //---------------------------------------------------------------------------
  40. #endif
  41.